class Setting:
    def __init__(self):
        # 屏幕的配置信息
        self.screen_width = 1200
        self.screen_height = 800
        self.bg_color = (255,255,255)

        # 飞船的配置信息
        self.ship_speed = 2
        self.ship_limit = 1   # 飞船的生命

        # 子弹设置
        self.bullet_speed = 5.0
        self.bullet_speed_rate = 1
        self.bullet_width = 50
        self.bullet_height = 15
        self.bullet_color = (60,60,60)
        self.bullet_allowed = 3  # 允许同时发射的子弹数

        # 外星人设置
        self.alien_speed = 3
        self.alien_drop_speed = 30
        self.alien_speed_rate = 1
        self.alien_score = 10   # 击落外星人的分值

    # 初始化设置数据
    def init_setting(self):
        self.alien_speed_rate = 1
        self.bullet_speed_rate = 1
        self.alien_score = 1

    # 升级游戏，子弹、外星人移速都增高，得分也增高
    def up_setting(self):
        self.alien_speed_rate *= 1.1
        self.bullet_speed_rate *= 1.2
        self.alien_score += 1